#ifndef __Key_C
#define __Key_C

#include "Key.h"

void key_init(){
    GPIO_Config_T     configStruct;
	
    RCM_EnableAPB2PeriphClock(Key_RTC);
	  
    /* Configure Button pin as input floating */
    configStruct.mode = GPIO_MODE_IN_FLOATING; //浮空输入
    configStruct.pin  = Key1_PinId;
    GPIO_Config(Key_PinPort, &configStruct);
		
}

uint8_t key_get_level(){  
	  return GPIO_ReadInputBit(Key_PinPort, Key1_PinId);
}

#endif

